package com.hrs.core.service;

import com.hrs.common.result.Result;
import com.hrs.enity.db.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hrs.enity.dto.UserViewDto;
import com.hrs.enity.ro.LoginFormRo;
import com.hrs.enity.ro.LoginResponseRo;
import com.hrs.enity.ro.UserRegisterRo;
import com.hrs.enity.vo.KaptchaVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 纱雾休比酱
* @description 针对表【t_user(系统用户表)】的数据库操作Service
* @createDate 2022-12-05 23:04:49
*/
public interface UserService extends IService<User> {

    /**
     * 用户登录
     * @param loginForm
     * @param request
     * @return
     */
    Result<LoginResponseRo> login(LoginFormRo loginForm, HttpServletRequest request);

    /**
     * 发送图片验证码
     * @return
     */
    Result<KaptchaVO> sendImgCode();

    /**
     * 退出登录
     * @return
     */
    Result<String> loginOut();

    /**
     * 发送手机验证码
     * @return
     */
    Result<String> sendPhoneCode(String phone);

    Result<String> register(UserRegisterRo userRegisterRo);

    Result<List<UserViewDto>> listUser(Integer roleId);
}
